package com.dlwx.parttimetalent.adapter;

import android.content.Context;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.dlwx.parttimetalent.R;
import com.dlwx.parttimetalent.bean.CommentsBean;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 * Created by Administrator on 2017/11/21.
 */

public class CommentAdapter extends ListBaseAdapter<CommentsBean.BodyBean> {
    private  Context context;
    public CommentAdapter(Context context) {
        super(context);
        this.context=context;
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_comment;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        CommentsBean.BodyBean bean= getDataList().get(position);
       CircleImageView image_header= holder.getView(R.id.image_header);
       TextView tv_time= holder.getView(R.id.tv_time);
       TextView tv_name= holder.getView(R.id.tv_name);
       TextView tv_content= holder.getView(R.id.tv_content);
        Glide.with(context).load(bean.getHeadurl()).into(image_header);
        tv_time.setText(bean.getEva_time());
        tv_name.setText(bean.getNickname());
        tv_content.setText(bean.getContent());


    }

}
